import java.io.File;

public class TestMain {
    public static void main(String[] args) {
        String markStr = "刘肖阳 1412";
        String wordIn = "C:\\Users\\Xiaoi\\Desktop\\测试用文件夹\\2021-11 WaterMark\\知识库QA.docx";
        String wordOut = "C:\\Users\\Xiaoi\\Desktop\\测试用文件夹\\2021-11 WaterMark\\知识库QA1.docx";
        String wordPdf = "C:\\Users\\Xiaoi\\Desktop\\测试用文件夹\\2021-11 WaterMark\\知识库_word.pdf";
//        OfficeWaterMarkUtil.addWaterMarkOffice(wordIn,wordOut,markStr);
//        Office2PdfUtil.officeToPdf(wordOut,wordPdf);
        String excelIn = "C:\\Users\\Xiaoi\\Desktop\\测试用文件夹\\2021-11 WaterMark\\测试.xlsx";
        String excelOut = "C:\\Users\\Xiaoi\\Desktop\\测试用文件夹\\2021-11 WaterMark\\测试1.xlsx";
        String excelPdf = "C:\\Users\\Xiaoi\\Desktop\\测试用文件夹\\2021-11 WaterMark\\测试1_excel.pdf";
        String excelPdf2 = "C:\\Users\\Xiaoi\\Desktop\\测试用文件夹\\2021-11 WaterMark\\测试1_excel最终.pdf";
        String excelPdf3 = "C:\\Users\\Xiaoi\\Desktop\\测试用文件夹\\2021-11 WaterMark\\测试excel自我覆盖.pdf";

//        Office2PdfUtil.officeToPdf(excelIn,excelPdf3);
//        PdfWaterMarkUtil.addPDFWaterMark(excelPdf3,excelPdf3,markStr);
        //OfficeWaterMarkUtil.addWaterMarkOffice(excelPdf3,excelPdf3 , markStr);

        String pptIn = "C:\\Users\\Xiaoi\\Desktop\\测试用文件夹\\2021-11 WaterMark\\测试用.pptx";
        String pptOut = "C:\\Users\\Xiaoi\\Desktop\\测试用文件夹\\2021-11 WaterMark\\测试用2.pptx";
        String pptPdf = "C:\\Users\\Xiaoi\\Desktop\\测试用文件夹\\2021-11 WaterMark\\测试用2_ppt.pdf";
        String pptPdfTemp = "C:\\Users\\Xiaoi\\Desktop\\测试用文件夹\\2021-11 WaterMark\\测试用2_pptTemp.pdf";

        Office2PdfUtil.officeToPdf(pptIn,pptPdfTemp);
        OfficeWaterMarkUtil.addWaterMarkOffice(pptPdfTemp,pptPdf,markStr);
        new File(pptPdfTemp).delete();
        //OfficeWaterMarkUtil.addWaterMarkOffice(pptIn,pptOut , markStr);
        //Office2PdfUtil.officeToPdf(pptOut,pptPdf);

    }
}
